using UnityEngine;
using System.Collections;

public class Pause : MonoBehaviour 
{
    public GameObject pauseImage;

	void Update () 
    {
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            Time.timeScale = 1 - Time.timeScale;
            pauseImage.SetActive(!pauseImage.activeSelf);
        }
	}
}
